cmake_minimum_required(VERSION 3.4.1)

add_library( # 设置库的名称
        native-lib

        # 设置为共享库
        SHARED

        # 源文件的相对路径
        native-lib.cpp)

#添加整个目录,在这里查找rtmp
add_subdirectory(librtmp)

#从系统目录中查找叫log的库，查找后把log赋值给log-lib中的变量
find_library( # Sets the name of the path variable.
        log-lib

        # specifies the name of the NDK library that
        # you want CMake to locate
        log)

target_link_libraries( # Specifies the target library.
        native-lib

        # Links the target library to the log library
        # included in the NDK.
        ${log-lib}
        rtmp
        )
